package homeWork;

public class Hero {
    /*
             第一列: 编号   id
             第二列: 姓名   name
             第三列: 所属地  location
             第四列: 性别    sex
             第五列: 出生年   birth
             第六列: 去世年   death
             第七列: 武力值   strength
         */
    private int id;
    private String name;
    private String location;
    private String sex;
    private int birth;
    private int death;
    private int strength;

    //构造方法
    public Hero() {
    }

    public Hero(int id, String name, String location, String sex, int birth, int death, int strength) {
        this.id = id;
        this.name = name;
        this.location = location;
        this.sex = sex;
        this.birth = birth;
        this.death = death;
        this.strength = strength;
    }
    //set/get方法

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getBirth() {
        return birth;
    }

    public void setBirth(int birth) {
        this.birth = birth;
    }

    public int getDeath() {
        return death;
    }

    public void setDeath(int death) {
        this.death = death;
    }

    public int getStrength() {
        return strength;
    }

    public void setStrength(int strength) {
        this.strength = strength;
    }

    @Override
    public String toString() {
        return "Hero{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", location='" + location + '\'' +
                ", sex='" + sex + '\'' +
                ", birth=" + birth +
                ", death=" + death +
                ", strength=" + strength +
                '}';
    }
}
